package com.tuanzi.loan.business.service.sms.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.retry.RetryException;
import org.springframework.retry.annotation.Retryable;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.tuanzi.loan.business.entity.sms.SmsSearchCondition;
import com.tuanzi.loan.business.repository.sms.SmsSearchConditionRepository;
import com.tuanzi.loan.business.service.sms.SmsSearchConditionService;
import com.tuanzi.loan.core.aspect.Debug;

import lombok.extern.slf4j.Slf4j;

/**
 * @author Ray 2017/09/21
 */
@Debug
@Slf4j
@Service
@Transactional
@Retryable(value = { RetryException.class })
public class SmsSearchConditionServiceImpl implements SmsSearchConditionService {

	@Autowired
	private SmsSearchConditionRepository smsSearchConditionRepository;

	@Override
	public SmsSearchCondition save(SmsSearchCondition smsSearchCondition) {
		return smsSearchConditionRepository.save(smsSearchCondition);
	}

	@Override
	public List<SmsSearchCondition> findAll() {
		return smsSearchConditionRepository.findAll();
	}

	@Override
	public SmsSearchCondition findOne(Long id) {
		return smsSearchConditionRepository.findOne(id);
	}

	@Override
	public void delete(Long id) {
		smsSearchConditionRepository.delete(id);
	}
}
